package com.atkxp.service;

import com.atkxp.dao.UserMapper;
import com.atkxp.pojo.Page;
import com.atkxp.pojo.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author user
 * @declaration
 * @create 2022/11/1-20:20
 */
public interface UserService {

    List<User> getAllUser();
    int registUser(User user);

    User login(String name, String password);

    boolean existUserName(String name);

    User showUserInfoByName(String name);

    int updateUser(User user);

    Integer setHeadImg(User user);

    User queryUsrById(int id);

    Page<User> getSubscribeUser(Map map);

    int subscribe(int userId);

    int unsubscribe(int userId);

    int subscribeAddRelation(int userId, int followUserId, Date followDate);

    int unsubscribeDeleteRelation(int userId, int followUserId);

    boolean existFollowRelationship(int userId,  int followUserId);

    Long getFollowCount(int followUserId);
}
